set_project("winvnc_proxy")
set_version("1.0.0")
set_languages("c99", "cxx11")
add_rules("mode.debug", "mode.release")

add_packagedirs("pkg")

function addTarget(t, callback)
  target(t)
    set_targetdir("bin")
    set_kind("binary")
    add_packages("wolfssl")

    if is_os("windows") then
      add_defines("MY_OS_WINDOWS")
      add_links("WS2_32")
    else -- others os regard as linux
      add_defines("MY_OS_LINUX")
      add_links("pthread")
    end


    if callback then callback() end
  target_end()
end

addTarget("winvnc_proxy", function() add_files("src/**.cc") end)
